<!--首页轮播图-->
<template>
  <div class="wraper">
    <swiper :options="swiperOption">
        <swiper-slide v-for='item in swiperList' :key='item.id'>
          <a href="javascript:;"><img class='slide-img' :src="item.imgUrl" alt=""/></a>
        </swiper-slide>
        <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  data () {
    return {
      swiperOption: {
        autoplay: {
          stopOnLastSlide: true
        },
        pagination: {
          el: '.swiper-pagination',
          clickable: 'true'
        },
        loop: true
      }
    }
  },
  props: {
    'swiperList': Array
  },
  components: {},
  computed: {
    swiper () {
      return this.$refs.mySwiper.swiper
    }
  },
  methods: {}
}

</script>
<style lang='stylus' scoped>
// 进行样式穿透
.wraper>>> .swiper-pagination-bullet-active
  background-color #fff !important
.wraper
  overflow hidden
  width 100%
  height: 0
  padding-bottom 25%
  .slide-img
    width 100%
</style>
